#ifndef PICTURE_H
#define PICTURE_H

#include <QWidget>
#include "jwidget/jdialog.h"
#include <QMainWindow>
#include <QPrinter>
#include <QDirModel>
#include <QTreeWidgetItem>
#include <QLabel>
#include <QScrollArea>
#include <QListWidget>
class QAction;
class QLabel;
class QMenu;
class QScrollArea;
class QScrollBar;
class QPushButton;
class QGridLayout;
class QPixmap;
class QPushButton;
class QTimer;

class PictureWidget : public       QDialog
{
    Q_OBJECT

public:
    explicit PictureWidget(QWidget *parent = 0);
    ~PictureWidget();
    QPixmap m_DeskFPixMap;


	QMovie *m_movie;
    QPoint m_pos;
    QPoint startPos;
    QTimer*m_pTimer;

     QList<QString> musicList;
     int nCount;
     QListWidget * listWidget;
     int goodCount;
     int nowCount;

   void mouseMoveEvent(QMouseEvent *event);
   void mousePressEvent(QMouseEvent *event);

	int fullscreen_flag;
    int m_flag;
    int countnet2;
    int deskflag;

signals:
    void openBtnClicked();
     void triggered();

private slots:
    void open6();
    void zoomIn();
    void zoomOut();
    void normalSize();
    void fitToWindow();
    void scaleImage(double factor);
    void adjustScrollBar(QScrollBar *scrollBar, double factor);
    void on_actionNext_triggered();
    void on_actionPrevious_triggered();
    void DisplayImage(const QString &fileName);
    void desk();
    void pictureClose();
    void autoNext();


private:
    QLabel *pimageLabel;
    QScrollArea *pScrollArea;
    double m_scaleFactor;

    QPushButton		*pOpenButton	;
    QPushButton		*pZinButton	;
    QPushButton		*pZoutButton	;
    QPushButton		*pNorButton	;
    QPushButton		*pNextButton	;
    QPushButton		*pPreviouButton	;
    QPushButton		*pFitButton	;
    QPushButton     *pWcloseButton;
    QPushButton     *pOpenFileButton;
    QPushButton     *pDeskButton;
    QStringList::const_iterator currentFile;
    QDir *dirCurrent;
    QStringList displayFiles;
    QDirModel *dirModel;
    QTreeView *treeView;
    QStringList supportFormat;
    QGridLayout		*pMainLayout;




    QPixmap *openfilepix;

};

#endif // WIDGET_H
